public class Date {
    public int year;
    public int month;
    public int day;
    public Date(){
        this(1921,7,23);
        System.out.println("不带参数的构造函数");
    }
    public Date(int year, int month, int day){
        this.year = year;
        this.month = month;
        this.day = day;
        System.out.println("带三个参数的构造函数");
        System.out.println(year + "年" + month + "月" + day + "日");
    }
    public void setDate(int year, int month, int day) {
        this.year =  year;
        this.month = month;
        this.day = day;
    }
    public void printDate(int year, int month, int day) {
        setDate(year, month, day);
        System.out.println(year + "年" + month + "月" + day + "日");
    }
}
